<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('敏感信息属性列表')"/>
    <link rel="stylesheet" type="text/css" th:href="@{/ajax/libs/qxEasyUI/themes/default/easyui.css}">
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="dept-form">
                <div class="select-list">
                    <ul>
                        <li>
                            属性编码：<input type="text" name="code"/>
                        </li>
                        <li>
                            属性名称：<input type="text" name="name"/>
                        </li>
                        <!--                        <li>-->
                        <!--                            内容类别：<input id="qxCT" style="width:242px;height:31px;"/>-->
                        <!--                            <input type="hidden" name="codePk" id="codePk"/>-->
                        <!--                        </li>-->
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-success" onclick="$.operate.add()">
                <i class="fa fa-plus"></i> 新增
            </a>
            <a class="btn btn-primary" onclick="$.operate.removeAll()">
                <i class="fa fa-edit"></i> 删除
            </a>
        </div>

        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:src="@{/ajax/libs/qxEasyUI/jquery.easyui.min.js}"></script>

<script th:inline="javascript">
    var prefix = ctx + "system/sensitive/infoField";

    $(function () {
        var options = {
            sortName:"id",
            sortOrder:"desc",
            uniqueId: "id",
            url: prefix + "/listJson",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            modalName: "敏感信息属性",
            columns: [{
                checkbox: true
            },
                {field:'id',title:'id',visible:false},
                // {field:'contentType',title:'内容类别',align:'center'},
                {field:'code',title:'属性编码',align:'center'},
                {field:'name',title:'属性名称',align:'center'},
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>&nbsp;编辑</a> ');
                        return actions.join('');
                    }
                }
            ]
        };
        $.table.init(options);
    });
</script>
</body>
</html>